odoo.define('activity_popover/static/src/components/composer/composer.js', function (require) {
'use strict';

const components = {
    ActivityPopover: require('activity_popover/static/src/components/activity_popover/activity_popover.js'),
    AttachmentList: require('mail/static/src/components/attachment_list/attachment_list.js'),
    ComposerSuggestedRecipientList: require('mail/static/src/components/composer_suggested_recipient_list/composer_suggested_recipient_list.js'),
    DropZone: require('mail/static/src/components/drop_zone/drop_zone.js'),
    EmojisPopover: require('mail/static/src/components/emojis_popover/emojis_popover.js'),
    FileUploader: require('mail/static/src/components/file_uploader/file_uploader.js'),
    TextInput: require('mail/static/src/components/composer_text_input/composer_text_input.js'),
    ThreadTextualTypingStatus: require('mail/static/src/components/thread_textual_typing_status/thread_textual_typing_status.js'),
};
const {patch} = require('web.utils')
const Composer = require('mail/static/src/components/composer/composer.js')

patch(Composer, "inherit.Composer",{
    _onActivitySelection(ev) {
        ev.stopPropagation();
        this._textInputRef.comp.saveStateInStore();
        this.composer.insertIntoTextInput("【" + ev.detail.name + "】");
        this.focus();
    }
})


Object.assign(Composer, {
    components,
});
});
